﻿using Basic.FormModel.DB;
using Basic.FormRemoteModel.FormDataSourceItem.Model;
using WeDonekRpc.SqlSugar;

namespace Basic.FormDAL.Repository
{
    internal class FormDataSourceItemDAL : BasicDAL<DBFormDataSourceItem, long>, IDataSourceItemDAL
    {
        public FormDataSourceItemDAL ( IRepository<DBFormDataSourceItem> basicDAL ) : base(basicDAL, "form.data.source.item")
        {
        }

        public SourceItem[] GetItems ( string sourceKey )
        {
            return this._BasicDAL.Gets<SourceItem>(a => a.SourceKey == sourceKey);
        }
    }
}
